/*
 * BAServerInfo.java
 * classes : com.qim.basdk.data.BAServerInfo
 * @author xuwei
 * V 1.0.0
 * Created at 2015年8月28日 上午10:37:56
 */
package com.langsheng.lsintell.data;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * com.qim.basdk.data.LSServerInfo
 * <p>
 * 服务器地址信息数据,包含ip地址,端口号
 *
 * @author xuwei
 *         <p>
 *         created at 2015年8月28日 上午10:37:56
 */
public class LSServerInfo implements Parcelable {

    private String ip = "";
    private int port = 0;

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public LSServerInfo(String ip, int port) {
        this.ip = ip;
        this.port = port;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.ip);
        dest.writeInt(this.port);
    }

    protected LSServerInfo(Parcel in) {
        this.ip = in.readString();
        this.port = in.readInt();
    }

    public static final Creator<LSServerInfo> CREATOR = new Creator<LSServerInfo>() {
        @Override
        public LSServerInfo createFromParcel(Parcel source) {
            return new LSServerInfo(source);
        }

        @Override
        public LSServerInfo[] newArray(int size) {
            return new LSServerInfo[size];
        }
    };
}
